<?php
/**
 * Created by PhpStorm.
 * User: stupboy
 * Date: 2018/5/31
 * Time: 14:02
 * Mail:87658989@qq.com
 */

namespace app\mobile\controller;


class Image extends Base
{
    public function upload(){
        $field    = input('pic_name','');
        $tempName = $_FILES[$field]["name"];
        $newName  = 'upload/head/'.date('YmdHis').substr($tempName,-4);
        move_uploaded_file($_FILES[$field]["tmp_name"],$newName);
        return $this->retSucc($newName);
    }
}